import React from 'react'
import {HashRouter as Router,Route,Switch} from 'react-router-dom'
import Home from './views/Home.js'
import News from './views/News.js'
import Sport from './views/Sport.js'
import List from './views/List.js'
import Detail from './views/Detail.js'
import NotFound from './views/NotFound.js'


class App extends React.Component {
  render() {
    return(
      <Router>
        <Switch>
          <Route exact path="/" component={ Home }></Route>
          <Route strict exact path="/news" component={ News }></Route>
          <Route path="/news/sport" component={ Sport }></Route>
          <Route path="/list/:id" component={ List }></Route>
          <Route path="/detail" component={ Detail }></Route>
          <Route component={ NotFound }></Route>
        </Switch>
      </Router>
    )
  }
}

export  default App
